package com.example.shopdemo.repository;

import com.example.shopdemo.entity.ProductImg;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author ：Anitaxiaofeng
 * @description：
 * @create 2018-01-21
 **/
public interface ProductImgRepository extends JpaRepository<ProductImg,Long> {


    void deleteByProductImgId(Long productImgId);


//    @Transactional
//    @Modifying
//    @Query(value = "delete from product_product_img_list where product_img_list_product_img_id = :productImgId ",nativeQuery = true)
//    void deleteProductProductImgByProductImgId(@Param("productImgId") Long productImgId);
}
